/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package tos.pip;

import org.jdesktop.application.FrameView;

/**
 *
 * @author Milos
 */
public class Pip {

    public Pip(FrameView parent) {
        Skladiste skladiste = new Skladiste(4);
        Proizvodjac[] proizvodjaci = new Proizvodjac[5];
        Potrosac[] potrosaci = new Potrosac[5];

        for (int i = 0; i < 5; i++) {
            proizvodjaci[i] = new Proizvodjac(skladiste, 1000, 2000, parent);
            potrosaci[i] = new Potrosac(skladiste, 1000, 2000, parent);
        }

        for (int i = 0; i < 5; i++) {
            proizvodjaci[i].start();
            potrosaci[i].start();
        }
    }
}
